<?php
include 'prihlaseni.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="content-language" content="cs-CZ">
	<meta name="keywords" content="<?php echo Settings::getKeywords(); ?>">
	<meta name="description" content="<?php echo Settings::getDescription(); ?>">
	<link rel="stylesheet" href="css/style.css" type="text/css">
	<link rel="stylesheet" href="select/chosen/chosen.css" type="text/css">
  	<script src="https://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js" type="text/javascript"></script>
 	<script src="select/chosen/chosen.proto.js" type="text/javascript"></script>
	<title><?php echo Settings::getTitle(); ?></title>
	
	<script type="text/javascript" src="ttiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
        // General options
        mode : "textareas",
        theme : "advanced",
        plugins : "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

        // Theme options
        theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
        theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
        theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
        theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
        theme_advanced_resizing : true,

        // Skin options
        skin : "o2k7",
        skin_variant : "silver",

        // Example content CSS (should be your site CSS)
        content_css : "css/example.css",

        // Drop lists for link/image/media/template dialogs
        template_external_list_url : "js/template_list.js",
        external_link_list_url : "js/link_list.js",
        external_image_list_url : "js/image_list.js",
        media_external_list_url : "js/media_list.js",

        // Replace values for the template plugin
        template_replace_values : {
                username : "Some User",
                staffid : "991234"
        }
});
</script>
	
	
</head>
<body>
<div id="wrapper">
<?php
if ($_SESSION['auth']->getStav() and ($_SESSION["control"] == serialize($_SESSION["auth"]))) {
	$nick = $_SESSION["auth"]->getNick();
	?>
	<div id="head">
		<div id="info">
			<div id="info-left">
				Přihlášen jako: <?php echo $nick?><br />
				Jméno: <?php echo Users::getJmeno($nick);?><br />
				Příjmeni: <?php echo Users::getPrijmeni($nick);?><br />
				Email: <?php echo Users::getEmail($nick);?>
			</div>
			<div id="info-right">
				<a href="?zpravy" class="menu">1 nová zpráva</a><br />
				<a href="?komentare" class="menu">3 nové komentáře</a><br />
				<a href="?odhlas" class="menu">odhlásit</a>
			</div>
		</div>
		<div id="lang">
			<label class="menu">Rozhraní administrace
				<select name="lang" class="chzn-select" style="width:100px;" id="jazyk">
					<option value="cs">České</option>
					<option value="en">Anglicé</option>
				</select>
			</label>
			<label class="menu">Verze webu
				<select name="lang" class="chzn-select" style="width:100px;" id="jazyk_edit">
					<option value="cs">Česká</option>
					<option value="en">Anglická</option>
				</select>
			</label>
		</div>
		<div id="menu">
			<ul>
				<li><a href="?uvod">Úvodní stránka</a></li>
				<li><a href="?kategorie">Kategorie</a></li>
				<li><a href="?clanky">Články</a></li>
				<li><a href="?stranky">Stránky</a></li>
				<li><a href="?obrazky">Obrázky</a></li>
				<li><a href="?soubory">Soubory</a></li>
				<li><a href="?uzivatele">Uživatelé</a></li>
				<li><a href="?nastaveni">Nastavení</a></li>
			</ul>
		</div>
		<div id="hledani">
			<form action="" method="get">
				<input type="text" name="query">
				<input type="hidden" name="prohledat_web">
				<input type="submit" value="Prohledat web">
			</form>
		</div>
	</div>
	<div id="content">
	<?php
	if (isset($_GET["uzivatele"])) {
		include 'include/uzivatele.php';
	}elseif (isset($_GET["nastaveni"])){
		include 'include/nastaveni.php';
	}elseif (isset($_GET["clanky"])){
		include 'include/clanky.php';
	}elseif (isset($_GET["kategorie"])){
		include 'include/kategorie.php';
	}elseif (isset($_GET["stranky"])){
		include 'include/stranky.php';
	}elseif (isset($_GET["prohledat_web"])){
		include 'include/prohledat.php';
	}else{
		include 'include/uvod.php';
	}?>
	</div>
	<div id="bottom">Patička</div>
<?php }else{?>
	<form action="" method="post">
		<label>Jmeno: <input type="text" name="nick"></label><br>
		<label>Heslo: <input type="password" name="password"></label><br>
		<input type="hidden" name="prihlasit">
		<input type="submit" value="Prihlasit">
	</form>
<?php }?>

</div>
</body>
</html>